<template>
  <el-container>
    <basic-crud :option="option" apiGetListUrl="/mes/workOperationHisController/gridHasOrder">
    </basic-crud>
  </el-container>
</template>

<script setup>
const option = ref({
  highlightCurrentRow: true,
  addBtn: false,
  menu: false,
  size: 'small',
  column: [
    {
      label:'项目号',
      prop:'projectName',
      sortable:true,
      overHidden: true,
      width: 150,
    },
    {
      label: "产品编号",
      prop: "pdmProductCode",
      search:true,
      searchSpan:6,
      overHidden: true,
      sortable:true,
      width: 150,
    },
    {
      label: "产品型号",
      prop: "modelName",
      hide:true,
      search: true,
      showColumn:false,
      searchSpan:6
    },
    {
      label: "产品名称",
      prop: "pdmProductName",
      hide:true,
      search: true,
      showColumn:false,
      searchSpan:6
    },
    {
      label: "规程编号",
      prop: "specificationCode",
      hide:true,
      search: true,
      showColumn:false,
      searchSpan:6
    },
    {
      label: "规程名称",
      prop: "specificationName",
      hide:true,
      showColumn:false,
      search: true,
      searchSpan:6
    },
    {
      label: "产品型号/名称",
      prop: "modelNameShow",
      search:false,
      width: 280,
      overHidden:true,
      formatter: (val) => {
        return val.modelName + "/" + val.pdmProductName;
      },
    },
    {
      label: "规程编号/名称",
      prop: "specificationCodeShow",
      width: 280,
      overHidden:true,
      formatter: (val) => {
        return val.specificationCode + "/" + val.specificationName;
      },
    },
    {
      label: "工步号/名称/版本",
      prop: "processCode",
      width: 180,
      overHidden:true,
      formatter: (val) => {
        return val.processCode + "/" + val.processName + "/" +val.processRev;
      },
    },
    {
      label: "操作时间",
      prop: "operationDate",
      type:'date',
      format:'yyyy-MM-dd HH:mm',
      width: 120,
    },
    {
      label: "检验员",
      prop: "operationUserCode",
      width: 120,
      formatter: (val) => {
        return val.operationUserCode + " " + val.operationUserName;
      },
    },
    {
      label: '工人操作者',
      prop: "assignUserCode",
      width: 120,
      formatter: (val) => {
        return val.assignUserCode + " " + val.assignUserName;
      },
    },
    {
      label: "退回原因",
      minWidth:280,
      prop: "des",
    },
  ]
})
</script>

<style lang="scss" scoped>

</style>
